

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<script type="text/javascript">
	$(document).ready(function(){	
		$("#editDonorForm").validate({
			rules: {
				name: {
					required : true
				}
			}
		});
	});
</script>	

<div id="editDonorDiv">
	<form:form name="editDonorForm" id="editDonorForm" action="saveDonor.do" method="post" modelAttribute="donor">
		<form:hidden path="id"/>
		<table>
			<tr class="row">
		  		<td class="label">&nbsp;</td>
		  	    <td class="input-field" colspan="2">
		  	    	<form:errors path="id" cssClass="success" element="div" />
		  	    	<form:errors path="" cssClass="error" element="div" />
		  	    </td>
			</tr>
			<tr class="row">
		  		<td class="label"><spring:message code="editDonor.label.name"/></td>
		  	    <td class="input-field"><form:input path="name" cssClass="input-full-width" /></td>
		  	    <td><form:errors path="name" cssClass="error"/></td>
			</tr>
		   	<tr class="row">
		   	    <td class="label"><spring:message code="editDonor.label.acronym"/></td>
		   	    <td class="input-field"><form:input path="acronym" cssClass="input-full-width" /></td>
		  	    <td><form:errors path="acronym" cssClass="error"/></td>
		 	</tr>
		 	<tr class="row">
		   	    <td class="label"><spring:message code="editDonor.label.url"/></td>
		   	    <td class="input-field"><form:input path="url" cssClass="input-full-width" /></td>
		  	    <td><form:errors path="url" cssClass="error"/></td>
		 	</tr>
		 	<tr class="row">
		 	   	<td class="label"> &nbsp; </td>
		   		<td class="input-field" align="center">
		   			<sj:submit id="loginFormSubmit" target="editDonorDiv" key="editDonor.button.save" validate="true" />
		   		</td>
		   		<td> &nbsp; </td>
		   	</tr>
		</table>     
	</form:form>
</div>


